﻿using Microsoft.AspNetCore.Http;
using QMERP.Domain.Dtos;
using System.Data;

namespace QMERP.Application.Services
{
    public interface IBasicService
    {
        /// <summary>
        /// Excel转DataTable
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        DataTable GetDataTable(IFormFile? file);
        /// <summary>
        /// XYExcel转DataTable
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        DataTable GetXYTable(IFormFile? file);
        /// <summary>
        /// XYExcel转LensDetails
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        List<LensDetailResponse> GetLensDetails(IFormFile? file);
        /// <summary>
        /// XYExcel转DataTable
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        Task<XYTableViewResponse> GetXYTableView(XYTableViewRequest request);
        /// <summary>
        /// 导出XYTableExcel
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        MemoryStream DownLoadXYTableExcel(DownLoadXYTableExcelRequest request);
        /// <summary>
        /// 获取所有图标名称
        /// </summary>
        /// <returns></returns>
        List<string> GetIcons();
    }
}
